<!DOCTYPE html>
<html>
<head>
  <title>网站示例</title>
</head>
<body>
  <div class="sousuo">
    <input id="baidu-search" name="" type="text" class="sousuo_in" />
    <a href="#" id="search-button"> <img src="images/logoko2.png" style="float:left;" /></a>
  </div>

  <script>
    // 获取搜索按钮和文本框的元素
    var searchButton = document.getElementById('search-button');
    var searchInput = document.getElementById('baidu-search');

    // 给搜索按钮添加点击事件
    searchButton.addEventListener('click', function(e) {
      // 阻止默认的链接跳转行为
      e.preventDefault();

      // 获取文本框的内容
      var searchText = searchInput.value;

      // 将文本框的内容填充到百度搜索框内
      var baiduSearchInput = document.getElementById('baidu-search');
      baiduSearchInput.value = searchText;

      // 跳转到百度搜索页面
      window.location.href = 'https://www.baidu.com/s?wd=' + encodeURIComponent(searchText);
    });
  </script>
</body>
</html>
